home *** CD-ROM | disk | FTP | other *** search
/ Gurewich OLE Controls for Visual Basic 4 / Gurewich OLE Controls for Visual Basic 4.iso / ocxprog / programs / ch20 / topmost.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-08-24  |  3.8 KB  |  121 lines

  1. VERSION 4.00
  2. Begin VB.Form frmTopMost 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "The Top Most Program"
  5.    ClientHeight    =   2340
  6.    ClientLeft      =   1095
  7.    ClientTop       =   1830
  8.    ClientWidth     =   4065
  9.    Height          =   3030
  10.    Icon            =   "TOPMOST.frx":0000
  11.    Left            =   1035
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    ScaleHeight     =   2340
  15.    ScaleWidth      =   4065
  16.    Top             =   1200
  17.    Width           =   4185
  18.    Begin VB.OptionButton optNotTopMost 
  19.       Caption         =   "I am &NOT the  top-most window."
  20.       BeginProperty Font 
  21.          name            =   "MS Sans Serif"
  22.          charset         =   0
  23.          weight          =   400
  24.          size            =   12
  25.          underline       =   0   'False
  26.          italic          =   0   'False
  27.          strikethrough   =   0   'False
  28.       EndProperty
  29.       Height          =   495
  30.       Left            =   120
  31.       TabIndex        =   0
  32.       Top             =   1080
  33.       Width           =   3855
  34.    End
  35.    Begin VB.OptionButton optTopMost 
  36.       Caption         =   "I am the &top-most window."
  37.       BeginProperty Font 
  38.          name            =   "MS Sans Serif"
  39.          charset         =   0
  40.          weight          =   400
  41.          size            =   12
  42.          underline       =   0   'False
  43.          italic          =   0   'False
  44.          strikethrough   =   0   'False
  45.       EndProperty
  46.       Height          =   495
  47.       Left            =   120
  48.       TabIndex        =   1
  49.       Top             =   480
  50.       Value           =   -1  'True
  51.       Width           =   3255
  52.    End
  53.    Begin TegotopLib.TegoTop TegoTop1 
  54.       Left            =   1560
  55.       Top             =   1680
  56.       _version        =   65536
  57.       _extentx        =   1640
  58.       _extenty        =   1058
  59.       _stockprops     =   0
  60.    End
  61.    Begin VB.Menu mnuFile 
  62.       Caption         =   "&File"
  63.       Begin VB.Menu mnuExit 
  64.          Caption         =   "E&xit"
  65.       End
  66.    End
  67.    Begin VB.Menu mnuHelp 
  68.       Caption         =   "&Help"
  69.       Begin VB.Menu mnuAbout 
  70.          Caption         =   "&About..."
  71.       End
  72.    End
  73. Attribute VB_Name = "frmTopMost"
  74. Attribute VB_Creatable = False
  75. Attribute VB_Exposed = False
  76. ' All variables must be declared.
  77. Option Explicit
  78. Private Sub Form_Load()
  79. ' Make this form a top-most window.
  80. TegoTop1.MakeWindowTopMost (Me.hWnd)
  81. End Sub
  82. Private Sub mnuAbout_Click()
  83.    Dim Title
  84.    Dim Msg
  85.    Dim CR
  86.    CR = Chr(13) + Chr(10)
  87.    ' Prepare the title of the About message box.
  88.    Title = "About the Top Most Program"
  89.    Msg = "This program was written with Visual "
  90.    Msg = Msg + "Basic for Windows, using the "
  91.    Msg = Msg + "TegoSoft Top Most gadget OCX control. "
  92.    Msg = Msg + CR + CR
  93.    Msg = Msg + "The TegoSoft Top Most gadget OCX control "
  94.    Msg = Msg + "is part of the TegoSoft OCX Control "
  95.    Msg = Msg + "Kit - a collection of various OCX controls. "
  96.    Msg = Msg + CR + CR
  97.    Msg = Msg + "For more information about the "
  98.    Msg = Msg + "TegoSoft OCX Control Kit, contact TegoSoft "
  99.    Msg = Msg + "at:"
  100.    Msg = Msg + CR + CR
  101.    Msg = Msg + "TegoSoft Inc." + CR
  102.    Msg = Msg + "P.O. Box 389" + CR
  103.    Msg = Msg + "Bellmore, NY 11710"
  104.    Msg = Msg + CR + CR
  105.    Msg = Msg + "Phone: (516)783-4824"
  106.    ' Display the About message box.
  107.    MsgBox Msg, vbInformation, Title
  108. End Sub
  109. Private Sub mnuExit_Click()
  110. ' Terminate the program.
  111. Unload Me
  112. End Sub
  113. Private Sub optNotTopMost_Click()
  114. ' Make this form a non top-most window.
  115. TegoTop1.MakeWindowNonTopMost (Me.hWnd)
  116. End Sub
  117. Private Sub optTopMost_Click()
  118. ' Make this form a top-most window.
  119. TegoTop1.MakeWindowTopMost (Me.hWnd)
  120. End Sub
  121.